package fr.uvsq.isty.bdh.hchess.gui.game;

import fr.uvsq.isty.bdh.hchess.gui.MainWindow;
import java.awt.BorderLayout;
import javax.swing.JPanel;

/**
 * A JPanel containing all the in game displays.
 * @author Rémi Dubois <RemiEric.Dubois@gmail.com>
 */
public class GameDisplay extends JPanel {
    
    public static final int DEFAULT_WIDTH = BoardDisplay.DEFAULT_CASE_WIDTH*14;
    public static final int DEFAULT_HEIGHT = BoardDisplay.DEFAULT_CASE_HEIGHT*9;
    
    private MainDisplayContainer mainDisplayContainer;
    private SecondaryDisplayContainer secondaryDisplayContainer;
        
    public GameDisplay(MainWindow mainWindow) {
        
        mainDisplayContainer = new MainDisplayContainer();
        
        secondaryDisplayContainer = new SecondaryDisplayContainer(mainWindow);
                
        this.setLayout(new BorderLayout());
        
        this.add(mainDisplayContainer, BorderLayout.CENTER);
        this.add(secondaryDisplayContainer, BorderLayout.EAST);
    }
    
    

    /**
     * @return the boardDisplay
     */
    public BoardDisplay getBoardDisplay() {
        return mainDisplayContainer.getBoardDisplay();
    }

    /**
     * @return the playerDisplay
     */
    public CurrentPlayerDisplay getCurrentPlayerDisplay() {
        return mainDisplayContainer.getCurrentPlayerDisplay();
    }

    /**
     * @return the blackCapturedPiecesDisplay
     */
    public CapturedPieceDisplay getBlackCapturedPiecesDisplay() {
        return mainDisplayContainer.getBlackCapturedPiecesDisplay();
    }
    
    /**
     * @return the whiteCapturedPiecesDisplay
     */
    public CapturedPieceDisplay getWhiteCapturedPiecesDisplay() {
        return mainDisplayContainer.getWhiteCapturedPiecesDisplay();
    }

    /**
     * @return the onHoverHelpDisplay
     */
    public OnHoverHelpDisplay getOnHoverHelpDisplay() {
        return mainDisplayContainer.getOnHoverHelpDisplay();
    }

    /**
     * @return the secondaryDisplayContainer
     */
    public SecondaryDisplayContainer getSecondaryDisplayContainer() {
        return secondaryDisplayContainer;
    }
    
    /**
     * @return the promotion choice panel
     */
    public PromotionChoicePanel getPromotionChoicePanel() {
        return secondaryDisplayContainer.getPromotionChoicePanel();
    }
    
}
